import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p001 from './p001';
import p004 from './p004';

export default async function a004(fd: IFeidaoAiBrowserComponent) {
	// todo
	const s = fd.data.node.querySelector<HTMLDivElement>('[data-feidao-presentation="p003"]');
	const s1 = fd.data.node.querySelector<HTMLDivElement>('[data-feidao-presentation="p004"]');
	const staff_name=fd.data.node.querySelector<HTMLInputElement>('[data-id="staff_name"]').value;
	const res=await nodejs<{ res: Array<{}>; s: Array<{}> }>('meeting-management/zj-000006/s002',{
		staff_name,
		pn:1
	});
	render(fd,res.res,p001,'p001','inner');
	if (res.s.length > 0) {
		s.style.display = 'none';
		s1.style.display = 'block';
		render(fd,res.s.length,p004,'p004','inner');

	}
}
